using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region Category

	/// <summary>
	/// Category object for NHibernate mapped table 'Category'.
	/// </summary>
	public class Category
	{
		#region Member Variables
		
		protected int _id;
		protected string _catName;
		protected string _keyWord;
		protected string _catDesc;
		protected int _parentId;
		protected int _sortOrder;
		protected string _measureUnit;
		protected bool _isShow;
        protected int _goodsType;
		#endregion

		#region Constructors

		public Category() { }

		public Category( string catName, string keyWord, string catDesc, int parentId, int sortOrder, string measureUnit, bool isShow )
		{
			this._catName = catName;
			this._keyWord = keyWord;
			this._catDesc = catDesc;
			this._parentId = parentId;
			this._sortOrder = sortOrder;
			this._measureUnit = measureUnit;
			this._isShow = isShow;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual string CatName
		{
			get { return _catName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for CatName", value, value.ToString());
				_catName = value;
			}
		}

		public  virtual string KeyWord
		{
			get { return _keyWord; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for KeyWord", value, value.ToString());
				_keyWord = value;
			}
		}

		public  virtual string CatDesc
		{
			get { return _catDesc; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for CatDesc", value, value.ToString());
				_catDesc = value;
			}
		}

		public  virtual int ParentId
		{
			get { return _parentId; }
			set { _parentId = value; }
		}

		public  virtual int SortOrder
		{
			get { return _sortOrder; }
			set { _sortOrder = value; }
		}

		public  virtual string MeasureUnit
		{
			get { return _measureUnit; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for MeasureUnit", value, value.ToString());
				_measureUnit = value;
			}
		}

		public  virtual bool IsShow
		{
			get { return _isShow; }
			set { _isShow = value; }
		}
        public virtual int GoodsType
        {
            get { return _goodsType; }
            set { _goodsType = value; }
        }

		

		#endregion
	}
	#endregion
}